/**
 * 活动详情对话框（可用于添加和修改对话框）
 */
layui.use(['rate'], function(){
    var rate = layui.rate;
    //半星效果
    rate.render({
        elem: '#carScore'
        ,value: 3
        ,half: true
        ,text: true
        ,choose:function (value) {
            $("#temp").val(value);
        }
    })
});

toClose = function () {
    parent.layer.close(window.parent.rent.layerIndex);
};

toSubmit = function () {
    var carScore = $("#temp").val();
    var rentAssess = $("#rentAssess").val();
    var ajax = new $ax(Feng.ctxPath + "/car/assess?recordId=" +
        Feng.getUrlParam("recordId") +
        "&carScore=" + carScore +
        "&rentAssess=" + rentAssess, function (data) {
        Feng.success("提交成功!");
        window.parent.rent.table.refresh();
        toClose();
    }, function (data) {
        Feng.success("提交成功!");
    });
    ajax.start();
};